using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using Edge.Business.Domain;
using Edge.Common.ComponentModel;
using Edge.Common.ComponentModel.Parameters;
using Shop.Business.Domain.Customers;

namespace Shop.Business.Domain.Orders
{
    [Serializable]
    public class OrderFilter : BaseFilter, ITextSearchSupported
    {
        private string keyword;
        private Customer customer;
        private int customerId;
        private OrderStatus? orderStatus;


        public string GetText()
        {
            return keyword;
        }

        public void SetText(string text)
        {
            keyword = text;
        }

        [Browsable(true),
         Description("Keyword"),
         Required(false),
         Category("Advanced Search"),
         Order(1)]
        public string Keyword
        {
            get { return keyword; }
            set { keyword = value; }
        }

        [QueryParameter("customerId", IsRequired = false)]
        public int CustomerId
        {
            get { return customerId; }
            set { customerId = value; }
        }

        public Customer Customer
        {
            get { return customer; }
            set { customer = value; }
        }

        [Browsable(true),
         Description("Status"),
         Required(false),
         Category("Advanced Filter"),
       QueryParameter("status", IsRequired = false)
         ]
        public OrderStatus? OrderStatus
        {
            get { return orderStatus; }
            set { orderStatus = value; }
        }


    }
}